home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
The World of Computer Software.iso
/
clpnet.zip
/
CLIPSUBA.DOC
< prev
next >
Wrap
Text File
|
1992-10-27
|
40KB
|
692 lines
┌──────────────────────┐
│ CLIPSUBA │
├──────────────────────┤
│ Assembly Subroutines │
│ for Clipper │
│ │
│ By Dave Frailey │
└──────────────────────┘
───────────────────────────────────────────────────────────────────────────────
CLIPSUBA (Clipper Subroutines in Assembler) is a collection of useful assembly
language routines for use with clipper, mostly centered around Novell API calls.
To use them simply specify either CLIPSUBS.OBJ (for Summer '87) or CLIPSUB5.OBJ
(for Clipper 5) as an additional object file for your linker to use (usually
following the primary object file having your program's filename).
These routines are released to the public domain for non-commercial use only.
The author retains exclusive rights to the source code, and may be contacted
at 805/264-1700 for licensing information in commercial applications.
┌───────────────────┐
│ CLIPSUBA │
├───────────────────┤
│ PUBLIC PROCEDURES │
└───────────────────┘
PROCEDURE CALLING CRITERIA
───────────── ───────────────────────────────────────────────────────────────
DCOMRES...... log=DCOMRES()
DPRINT....... void=DPRINT(Port,Text[,Length])
DPRINTT...... int=DPRINTT(Port,Text,Length,Ticks)
DCLRSPL...... void=DCLRSPL()
DGSSIZE...... int*4=DGSSIZE()
DGSIUSE...... int*4=DGSIUSE()
DGSPORT...... int*2=DGSPORT()
CPRNRDY...... log=CPRNRDY(Port)
CMOUSE....... log=CMOUSE(Parm1,Parm2,Parm3,Parm4)
CMSEEMU...... log=CMSEEMU(HSens,VSens)
CGRES1....... int=CGRES1()
CGRES2....... int=CGRES2()
CGRES3....... int=CGRES3()
CGRES4....... int=CGRES4()
CGCDIR....... str=CGDIR([Drive])
CGVDRVS...... str=CGVDRVS()
CSETCSR...... void=CSETCSR(Start,End)
MKDIR........ log=MKDIR(Path)
RMDIR........ log=RMDIR(Path)
SETPAL....... void=SETPAL(List)
CHEX......... str=CHEX(Value)
FTEMP........ int=FTEMP(Path)
NFILCHK...... int=NFILCHK(Filespec)
NUSRID....... str=NUSRID()
NUSRNAM...... str=NUSRNAM()
NSNDMSG...... log=NSNDMSG(Name,Text)
NGOCCNT...... int=NGOCCNT(ObjName,ObjType)
NSVRNAM...... str=NSVRNAM()
NATTACH...... log=NATTACH(Server)
NDETACH...... log=NDETACH(Server)
NPRISVR...... log=NPRISVR([Server])
NPRESVR...... log=NPRESVR([Server])
NLOGIN....... log=NLOGIN(Name,Password,ObjType)
NLOGOUT...... log=NLOGOUT([Server])
NGOLIST...... int=NGOLIST(Name,Group,ObjType,ObjName[],IdText[],IdNumber[])
NQATTCH...... log=NQATTCH(QueueID)
NQDETCH...... log=NQDETCH(QueueID)
NSVQJOB...... int=NSVQJOB(QueueID,[JobType])
NFSQJOB...... log=NFSQJOB(QueueID,JobNumber)
NASQJOB...... log=NASQJOB(QueueID,JobNumber)
NCRIGTS...... log=NCRIGTS(QueueID,JobNumber)
NRRIGTS...... log=NRRIGTS()
NQJLIST...... int=NQJLIST(QueueID)
NQGJLNO...... int=NQGJLNO(Index)
NQGJSTS...... str=NQGJSTS(QueueID,JobNumber)
NQGFSIZ...... int*4=NQGFSIZ(QueueID,JobNumber)
NDTTIME...... str=NDTTIME()
NSBCMDE...... void=NSBCMDE(mode)
NGBCMSG...... str=NGBCMSG()
NATTDIR...... log=NATTDIR(Object,Type,Rights,Directory)
┌───────────────────────┐
│ CLIPSUBA │
├───────────────────────┤
│ REFERENCE GUIDE │
└───────────────────────┘
┌─────────────────────────────────────────────────────────────────────────────┐
│ log=DCOMRES() {Check if dCOM is Resident} │
└─────────────────────────────────────────────────────────────────────────────┘
■ Returns a logical true if dCOM is resident in memory, otherwise false.
┌─────────────────────────────────────────────────────────────────────────────┐
│ void=DPRINT(Port,Text[,Length] {Print to dCOM's Spooler} │
└─────────────────────────────────────────────────────────────────────────────┘
■ Prints text to the specified port, directly addressing dCOM's Spooler
if resident. If dCOM is not resident, DPRINT will handle printing.
■ "Port" is an integer ranging from 0 to 2, corresponding to LPT1 to LPT3.
■ "Text" is a variable length string to be printed.
■ "Length" is an optional integer specifying the length of the text to
print. If Length is not specified, DPRINT will print up to the first
null terminating character found. Length should be used when the text
may have embedded nulls (ASCII 0) which are meant to be printed.
┌─────────────────────────────────────────────────────────────────────────────┐
│ int=DPRINTT(Port,Text,Length,Ticks) {Print to dCOM's Spooler} │
└─────────────────────────────────────────────────────────────────────────────┘
■ Prints text to the specified port, directly addressing dCOM's Spooler
if resident. If dCOM is not resident, DPRINTT will handle printing.
■ If dCOM's spooler isn't used (either because its active on a different
port, or does not exist) DPRINTT will time-out after the number of timer-
ticks specified, returning the actual number of characters printed.
■ "Port" is an integer ranging from 0 to 2, corresponding to LPT1 to LPT3.
■ "Text" contains the string to be printed.
■ "Length" is an integer specifying the total size of the text to print.
■ "Ticks" is the number of timer ticks (1 tick = 1/18th of a second).
┌─────────────────────────────────────────────────────────────────────────────┐
│ void=DCLRSPL() {Clear dCOM's Print Spooler} │
└─────────────────────────────────────────────────────────────────────────────┘
■ Clears dCOM's print spooler and begins flush period if dCOM is resident.
┌─────────────────────────────────────────────────────────────────────────────┐
│ int*4=DGSSIZE() {Get dCOM's Print Spooler Size} │
└─────────────────────────────────────────────────────────────────────────────┘
■ Returns a long integer of the total size of dCOM's print spooler in bytes.
┌─────────────────────────────────────────────────────────────────────────────┐
│ int*4=DGSIUSE() {Get dCOM's Spooler In Use Size} │
└─────────────────────────────────────────────────────────────────────────────┘
■ Returns a long integer of the space in use in dCOM's print spooler.
┌─────────────────────────────────────────────────────────────────────────────┐
│ int*2=DGSPORT() {Get dCOM's Spooler Port In Use} │
└─────────────────────────────────────────────────────────────────────────────┘
■ Returns an integer or 0 to 2 defining the active spooler port.
■ If the spooler is not active, the last port accessed, or a value of FFFFh
if no port has yet been accessed, is returned.
┌─────────────────────────────────────────────────────────────────────────────┐
│ log=CPRNRDY([Port]) {Get Printer Ready Status} │
└─────────────────────────────────────────────────────────────────────────────┘
■ Returns logical true if the specified printer port is on-line and ready
to receive a character.
■ "Port" is an optional integer ranging from 0 to 2, corresponding to LPT1
to LPT3. If Port is not specified, LPT1 will be assumed.
┌─────────────────────────────────────────────────────────────────────────────┐
│ log=CMOUSE(Parm1,Parm2,Parm3,Parm4) {Mouse Driver Function Call} │
└─────────────────────────────────────────────────────────────────────────────┘
■ Allows access to the mouse driver at interrupt 33h.
■ Returns a logical false if mouse driver is not present.
■ "Parm1" through "Parm4" represent registers AX through DX respectively.
■ Parameters returned from the mouse driver are accessed using CGRES1 -4.
■ For more information refer to documentation covering interrupt 33h.
┌─────────────────────────────────────────────────────────────────────────────┐
│ log=CMSEEMU(HSens,VSens) {Mouse Driver Keyboard Emulation} │
└─────────────────────────────────────────────────────────────────────────────┘
■ Allows mouse to emulate keyboard cursor motion.
■ Returns a logical false if mouse driver is not present.
■ "HSens" and "VSens" allow setting mickey ratio sensitivity. Higher
numbers produce lower sensitivity. The default is HSens=7, VSens=5.
■ Care must be taken to call CMOUSE(0) before the program exits in order to
prevent the mouse driver from calling the background mouse event handler
established by this routine, which may no longer be resident in memory.
┌─────────────────────────────────────────────────────────────────────────────┐
│ int=CGRES1() - intCGRES4() {Retrieve Function Response} │
└─────────────────────────────────────────────────────────────────────────────┘
■ CGRES1() through CGRES4() retrieve parameters passed back from functions
such as the mouse driver call, CMOUSE.
■ CGRES1() retrieves the value passed back in the AX register.
■ CGRES2() retrieves the value passed back in the BX register.
■ CGRES3() retrieves the value passed back in the CX register.
■ CGRES4() retrieves the value passed back in the DX register.
┌─────────────────────────────────────────────────────────────────────────────┐
│ str=CGCDIR([Drive]) {Get Current Directory Text} │
└─────────────────────────────────────────────────────────────────────────────┘
■ Returns the text of the default drive and its current directory.
■ If "Drive" is specified (as a text parameter), then the current directory
of the specified drive is returned.
┌─────────────────────────────────────────────────────────────────────────────┐
│ str=CGVDRVS() {Get Valid Drives} │
└─────────────────────────────────────────────────────────────────────────────┘
■ Returns a text string of the drive letters for valid drive references.
■ For example, if A:, B:, C:, and F: are all valid drives "ABCF" will be
returned.
┌─────────────────────────────────────────────────────────────────────────────┐
│ void=CSETCSR(Start,End) {Set Cursor Shape} │
└─────────────────────────────────────────────────────────────────────────────┘
■ Sets the cursor shape.
■ Normal underline cursor start and end is 6,7.
■ Normal block cursor start and end is 0,7.
┌─────────────────────────────────────────────────────────────────────────────┐
│ log=MKDIR(Path) {Make Directory} │
└─────────────────────────────────────────────────────────────────────────────┘
■ Makes a Directory.
■ Returns a logical false if function failed.
┌─────────────────────────────────────────────────────────────────────────────┐
│ log=RMDIR(Path) {Remove Directory} │
└─────────────────────────────────────────────────────────────────────────────┘
■ Removes a Directory.
■ Returns a logical false if function failed.
┌─────────────────────────────────────────────────────────────────────────────┐
│ void=SETPAL(List) {Set Color Palette} │
└─────────────────────────────────────────────────────────────────────────────┘
■ Sets (remaps) EGA/VGA Color Palette by directly calling:
Int 10H, Function 10h, Subfunction 2h.
■ This procedure is called with a string list of 17 bytes. The first 16
bytes directly correspond to the color numbers being remapped. The last
byte is used to control the border palette.
■ The default palette (normal mapping) is the following string:
0,1,2,3,4,5,20,7,56,57,58,59,60,61,62,63,0
■ Bytes within the string must be built using the Clipper CHR() function.
For example: palette=chr(0)+chr(1)+chr(2)...chr(63)+chr(0)
setpal(palette)
┌─────────────────────────────────────────────────────────────────────────────┐
│ str=CHEX(Value) {Convert to Hex String} │
└─────────────────────────────────────────────────────────────────────────────┘
■ Converts the value passed to an 8-byte hex string.
┌─────────────────────────────────────────────────────────────────────────────┐
│ int*2=FTEMP(Path) {Create Temporary File} │
└─────────────────────────────────────────────────────────────────────────────┘
■ Creates a temporary file in the path specified.
■ Returns the handle of the created file, or -1 if unsuccessful.
┌─────────────────────────────────────────────────────────────────────────────┐
│ int=NFILCHK(Filespec) {Network File Access Check} │
└─────────────────────────────────────────────────────────────────────────────┘
■ Returns an integer result describing a users access rights to a file.
■ "Filespec" is the [path]filename to test privaleges on.
■ The values returned are:
0 = Full Access
1 = File Not Found
2 = Read Access Denied
3 = Write Access Denied
┌─────────────────────────────────────────────────────────────────────────────┐
│ str=NUSRID() {Get User ID Number} │
└─────────────────────────────────────────────────────────────────────────────┘
■ Returns the ID number of a user logged in to a Novell network.
■ The ID number is returned as a string of hex digits with leading
zeros removed. The maximum length of a user ID string is 8 characters.
■ If the workstation is not currently logged in or if the Novell shell
drivers are not resident, a null string is returned.
┌─────────────────────────────────────────────────────────────────────────────┐
│ str=NUSRNAM() {Get User Name} │
└─────────────────────────────────────────────────────────────────────────────┘
■ Returns the login name of a user logged in to a Novell network.
■ If the workstation is not currently logged in or if the Novell shell
drivers are not resident, a null string is returned.
┌─────────────────────────────────────────────────────────────────────────────┐
│ log=NSNDMSG(Name,Text) {Broadcast Message} │
└─────────────────────────────────────────────────────────────────────────────┘
■ Sends a message to the specified user on their 25th line of the screen.
■ A logical false is returned if the user is not logged in, the user does
not exist, or the sender is not logged in.
■ "Name" is the login name of the user to receive the message.
■ "Text" is the message to send (up to 55 characters).
┌─────────────────────────────────────────────────────────────────────────────┐
│ int=NGOCCNT(ObjName,ObjType) {Get Object Connection Count} │
└─────────────────────────────────────────────────────────────────────────────┘
■ Returns a count of how many times a specific object is logged in to the
default file server.
■ "ObjName" is the name of the object to check.
■ "ObjType" is the object type number of the object being searched for.
A user has a type number of 1. For more object type numbers refer
to the list given under NGOLIST.
┌─────────────────────────────────────────────────────────────────────────────┐
│ str=NSVRNAM() {Get Default File Server Name} │
└─────────────────────────────────────────────────────────────────────────────┘
■ Returns the name of the current default file server.
■ A workstation need not be logged in to use this call.
■ The maximum length of a file server's name is 47 characters plus the
end of text character.
┌─────────────────────────────────────────────────────────────────────────────┐
│ log=NATTACH(Server) {Attach To File Server} │
└─────────────────────────────────────────────────────────────────────────────┘
■ Installs a server in a workstation shell's server connection table.
■ Before objects can log in to a file server, they must first be attached
in the workstation's server connection table.
■ This function returns a logical true if the server specified was already
attached or is successfully attached. A logical false is returned if
the server name specified is not a valid, or the workstation's connection
table is full (limited to 8 simultaneous server attachments).
■ To ensure that a subsequent login attempt is directed to the proper file
server, follow this call with a call to NPRISVR, to establish the primary
file server.
┌─────────────────────────────────────────────────────────────────────────────┐
│ log=NDETACH(Server) {Detach From File Server} │
└─────────────────────────────────────────────────────────────────────────────┘
■ Detaches a file server, erasing it from the server connection table.
Any further attempts to communicate with the detached server must first
be preceded by a call to NATTACH to attach it.
■ Returns false if the server specified is not found in the file server
connection table.
■ If an object was logged in to the server being detached, it will be
automatically logged out.
■ This procedure will not erase a server from the connection list if it is
the only server in the connection list. It will however, still logout
any objects logged in to that server.
┌─────────────────────────────────────────────────────────────────────────────┐
│ log=NPRISVR([Server]) {Set Primary Connection ID} │
└─────────────────────────────────────────────────────────────────────────────┘
■ Sets the server name specified as the "Primary Connection ID".
■ If this function is called with no parameters, the primary
connection ID is reset to no primary connection.
■ A logical false is returned if the server specified is not currently
attached in the workstation's file server connection table.
■ Normally the first server logged in to is set as the primary connection
number, even if subsequent servers are attached and logged in to as well.
■ Before logging in to the first file server, ensure it is attached by
first calling NATTACH, and then set it as the primary connection by using
this procedure. Subsequent attachments and logins should then be done
by using NATTACH, then temporarily set the "preferred" connection to the
subsequent server's name, use NLOGIN to log in to the subsequent server,
and then use NPRESVR() to release the preferred connection.
■ To temporarily communicate with a secondarily logged in server, use
NPRESVR(server) to temporarily switch communications with the server and
then use NPRESVR() to release the preferred connection so that the primary
connection connection is active again.
■ Note that disk drive references are immune to which server is currently
preferred or which server is primary. Their appropriate server is
arbitrarily resolved by the work station's shell automatically.
┌─────────────────────────────────────────────────────────────────────────────┐
│ log=NPRESVR([Server]) {Set Preferred Connection ID} │
└─────────────────────────────────────────────────────────────────────────────┘
■ Sets the server name specified as the "Preferred Connection ID".
■ If this function is called with no parameters, the Preferred
Connection ID is reset to no preferred connection.
■ The preferred connection is used to temporarily override the
"Primary Connection Id" when using ambiguous file server requests.
Preferred connections are automatically reset when a application
program terminates.
■ A logical false is returned if the server specified is not currently
attached in the workstation's file server connection table.
■ Normally the first server logged in to is set as the primary connection
number, even if subsequent servers are attached and logged in to as well.
Subsequent attachments and logins should be done by using NATTACH, then
temporarily set the "preferred" connection to the subsequent server's
name, use NLOGIN to log in to the subsequent server, and then use
NPRESVR() to release the preferred connection.
■ To temporarily communicate with a secondarily logged in server, use
NPRESVR(server) to temporarily switch communications with the server
and then use NPRESVR() to release the preferred connection so that the
primary connection connection is active again.
■ Note that disk drive references are immune to which server is currently
preferred or which server is primary. Their appropriate server is
resolved automatically by the work station's shell.
┌─────────────────────────────────────────────────────────────────────────────┐
│ log=NLOGIN(Name,Password,ObjType) {Login to Default File Server} │
└─────────────────────────────────────────────────────────────────────────────┘
■ Logs an object in to the default file server. To ensure the file
server desired is attached and is the current primary connection,
preceed this function with calls to NATTACH, and NPRISVR.
■ "Name" is the object's name being logged in.
■ "Password" is the password text for the object being logged in.
■ "ObjType" is the object type number of the object being logged in.
A user has a type number of 1. For more object type numbers refer
to the list given above under NGOLIST.
■ No action automatically follows this call such as executing a system
login script or remapping of network drives
■ NLOGIN returns a logical true if login is successful.
┌─────────────────────────────────────────────────────────────────────────────┐
│ log=NLOGOUT([Server]) {Logout} │
└─────────────────────────────────────────────────────────────────────────────┘
■ Logs an object out from the file server specified.
■ If this function is called with no parameters, all file servers that
are logged in to will be logged out of.
■ A logical false is returned if the server specified is not currently
attached in the workstation's file server connection table.
┌─────────────────────────────────────────────────────────────────────────────┐
│ int=NGOLIST(Name,Mask,ObjType,ObjName[],IdText[],IdNumber[]) {Obj List} │
└─────────────────────────────────────────────────────────────────────────────┘
■ Returns a list of Novell objects based on the object name, object type,
and group names passed.
■ This function can be used to list all user names, or all group names,
or all users belonging to a group.
■ The array names specified as "objname", "idname", and "objid" must
have been properly dimensioned and filled before calling NGOLIST.
■ "Name" is the object name mask to search for. Wildcard characters are
legal in the context used under Dos (i.e. "?" and "*").
■ "Mask" is a secondary mask to be applied to the search. The "Mask" is
only active if the "ObjType" being searched is Users (1), or Groups(2).
When the object "Name" being searched is for users, the "Mask" field is
used to reduce the search to groups matching the "Mask". If the object
"Name" being searched is for groups, the "Mask" field is used to reduce
the search to users matching the "Mask". Wildcard characters are legal
in the context used under Dos (i.e. "?" and "*").
■ "ObjType" is the object type being searched. Object types are integer
values as defined by Novell. User's have an object type of 1. User
groups have an object type of 2, and so on.... If the object type is
not Users (1), or Groups (2), the "Mask" field described above is ignored
but must be accounted for when delmiting parameters.
■ "ObjName[]" is an array filled in by the search which contains the object
names found. In the case of users, an object name is the login name.
In the case of user groups, the object name is the group's name.
The maximum length of this text is 47 characters plus the End of Text
character.
■ "IdText[]" is an array filled in by the search which contains the
identification property of the objects found. This text is normally
the object's full name. The maximum length of this text is 127 characters
plus the End of Text character.
■ "IdNumber[]" is an array filled in by the search which contains the object
numbers found. In the case of a search for users, the object number is
the user's ID number. Object numbers are returned as a string of hex
digits with the leading zeros removed. The maximum length of a object
number is 8 characters plus the End of Text character.
■ If an AFILL instruction does not directly preceed each call to NGOLIST,
care must be taken to ensure that none of the character array elements
are TRIMMED between calls. NGOLIST cannot expand the memory (variables)
passed to it. If the current length of an array element is insufficient
to hold the new text, NGOLIST will truncate its output to that available.
Example Program:
clear
public ObjName[100], IdText[100], IdNumber[100]
afill (ObjName,space(20))
afill (IdText,space(47))
afill (IdNumber,space(8))
count=NGOLIST("*", "*", 1, ObjName, IdText, IdNumber)
? "List of All Users "
for i = 1 to count
? ObjName[i]+IdText[i]+IdNumber[i]
next i
count=NGOLIST("John*", "*", 1, ObjName, IdText, IdNumber)
? "List of All Users With a Login Name of John something"
for i = 1 to count
? ObjName[i]+IdText[i]+IdNumber[i]
next i
count=NGOLIST("*", "MIS", 1, ObjName, IdText, IdNumber)
? "List of All Users Belonging to Group MIS"
for i = 1 to count
? ObjName[i]+IdText[i]+IdNumber[i]
next i
count=NGOLIST("*", "MIS*", 1, ObjName, IdText, IdNumber)
? "List of All Users Belonging to Group MIS_READ or MIS_WRITE"
for i = 1 to count
? ObjName[i]+IdText[i]+IdNumber[i]
next i
count=NGOLIST("*", "*", 2, ObjName, IdText, IdNumber)
? "List of All User Groups "
for i = 1 to count
? ObjName[i]+IdText[i]+IdNumber[i]
next i
count=NGOLIST("*", "John", 2, ObjName, IdText, IdNumber)
? "List of All User Groups Which John Belongs To"
for i = 1 to count
? ObjName[i]+IdText[i]+IdNumber[i]
next i
This procedure is normally useful for returning the names of logged in
users, or users that belong to a certain group(s). However, by changing
the object type to other Novell defined objects, you can return a list
of just about anything (i.e., print queues, print servers, gateways,
bridge servers, etc...). The following is a list of Object Types as
currently defined in Netware 286 Version 2.15c:
Name Type
─────────────────────────── ────
User....................... 1
User Group................. 2
Print Queue................ 3
File Server................ 4
Job Server................. 5
Gateway.................... 6
Print Server............... 7
Archive Queue.............. 8
Archive Server............. 9
Job Queue.................. 10
Administration............. 11
Remote Bridge Server....... 38
Advertising Print Server... 71
┌─────────────────────────────────────────────────────────────────────────────┐
│ log=NQATTCH(QueueID) {Attach Queue Server to Queue} │
└─────────────────────────────────────────────────────────────────────────────┘
■ Allows a job (print) server to attach itself to the specified queue.
■ The currently logged in object should have logged in with an object
type equivalent to the queue involved (i.e. Object Type 7 = Print Server,
Object Type 5 = Job Server, etc...)
■ "QueueID" is a string containing the hex object ID Number of the queue
to attach to. The string need not be padded with leading zeros.
■ The currently logged in object must have been configured in the desired
queue as a valid job (or print) server.
■ A logical false is returned if the queue does not exist, no login exists,
or the object logged in is not a valid server for the queue.
┌─────────────────────────────────────────────────────────────────────────────┐
│ log=NQDETCH(QueueID) {Detach Queue Server From Queue} │
└─────────────────────────────────────────────────────────────────────────────┘
■ Allows a job (print) server to detach itself from the specified queue.
■ "QueueID" is a string containing the hex object ID Number of the queue
to detach from. The string need not be padded with leading zeros.
■ The currently logged in object must have been configured in the desired
queue as a valid job (or print) server, and have attached itself to the
queue.
■ A logical false is returned if the queue does not exist, no login exists,
or the object logged in is not a valid server for the queue.
┌─────────────────────────────────────────────────────────────────────────────┐
│ int=NSVQJOB(QueueID,[JobType]) {Service Queue Job and File} │
└─────────────────────────────────────────────────────────────────────────────┘
■ Allows a job (print) server to begin servicing a job in specified queue.
■ "QueueID" is a string containing the hex object ID Number of the queue
to service from. The string need not be padded with leading zeros.
■ "JobType" is an option parameter specifying the type number of only the
jobs which will be accepted. If the JobType is not specified, any jobs
available for service will be accepted.
■ The currently logged in object must have been configured in the desired
queue as a valid job (or print) server, and have attached itself to the
queue.
■ If a queue job is ready and the server is properly attached, a job number
is returned and the job server can then open and read/write the job file
using the network device name NETQ.
┌─────────────────────────────────────────────────────────────────────────────┐
│ log=NFSQJOB(QueueID,JobNumber) {Finish Servicing Queue Job and File} │
└─────────────────────────────────────────────────────────────────────────────┘
■ Allows a job (print) server to signal the file server that it has
completed servicing a job.
■ "QueueID" is a string containing the hex object ID Number of the queue
to service from. The string need not be padded with leading zeros.
■ "JobNumber" is the job number returned when the job was accepted by
using NSVQJOB above.
■ This call removes the job entry, closes and deletes the associated job
file, and (if the job server has changed to the client's directory access
rights) restores the calling job server's directory access rights to
their original (login) value.
┌─────────────────────────────────────────────────────────────────────────────┐
│ log=NASQJOB(QueueID,JobNumber) {Abort Servicing Queue Job and File} │
└─────────────────────────────────────────────────────────────────────────────┘
■ Allows a job (print) server to signal the file server that it cannot
complete servicing a job previously accepted for service.
■ "QueueID" is a string containing the hex object ID Number of the queue
to service from. The string need not be padded with leading zeros.
■ "JobNumber" is the job number returned when the job was accepted by
using NSVQJOB above.
■ This call causes the associated job file to be closed and, if the job
server has changed to the client's directory access rights, resets the
calling job server's directory access rights to their original values.
■ When a job is aborted, the file server checks the job entry's Service
Restart flag to determine whether the job can be restarted automatically
after a job server aborts the job. If the job entry's Service Restart
flag is set, the file server clears the job entry's Server Station,
Server Task, and Server ID Number fields and leaves the entry in its
current position in the queue.
┌─────────────────────────────────────────────────────────────────────────────┐
│ log=NCRIGTS(QueueID,JobNumber) {Change To Client Rights} │
└─────────────────────────────────────────────────────────────────────────────┘
■ Allows a job (print) server to assume the login identity of the client
that placed the job being serviced in the queue.
■ A job being serviced may require that the job server access directories
and files using the access rights of the client that placed the job into
the queue.
■ "QueueID" is a string containing the hex object ID Number of the queue
to service from. The string need not be padded with leading zeros.
■ "JobNumber" is the job number returned when the job was accepted by
using NSVQJOB above.
┌─────────────────────────────────────────────────────────────────────────────┐
│ log=NRRIGTS() {Restore Queue Server Rights} │
└─────────────────────────────────────────────────────────────────────────────┘
■ Restores a job (print) server's own identity after it has assumed a
client's login identity.
┌─────────────────────────────────────────────────────────────────────────────┐
│ int=NQJLIST(QueueID) {Get Queue Job List} │
└─────────────────────────────────────────────────────────────────────────────┘
■ Allows a job (print) server to retrieve a list of all jobs pending in the
specified queue.
■ "QueueID" is a string containing the hex object ID Number of the queue
to service from. The string need not be padded with leading zeros.
■ The integer value returned is a count of job numbers found. To retrieve
the job numbers found, follow this call with a call to NQGJLNO, described
below.
┌─────────────────────────────────────────────────────────────────────────────┐
│ int=NQGJLNO(Index) {Get Job List Job Number} │
└─────────────────────────────────────────────────────────────────────────────┘
■ Returns a integer representing the job number using the index specified.
■ The job list is actually updated by calling NQJLIST above. Calls to
NQGJLNO access a static buffer holding the job list numbers produced
by calling NQJLIST.
┌─────────────────────────────────────────────────────────────────────────────┐
│ str=NQGJSTS(QueueID,JobNumber) {Get Queue Job Status} │
└─────────────────────────────────────────────────────────────────────────────┘
■ Returns a string comprising of the specified job number's status.
■ "QueueID" is a string containing the hex object ID Number of the queue
to service from. The string need not be padded with leading zeros.
■ "JobNumber" is the job number returned when the job was accepted by
using NSVQJOB above.
■ The string is made up of fixed fields defined as follows:
Offset 0: Object's Name (20 Characters)
Offset 20: Queue Job Text Description (40 Characters)
Offset 60: Queue Job Status (6 Characters)
Offset 66: Queue Job Number (5 Characters)
┌─────────────────────────────────────────────────────────────────────────────┐
│ int*4=NQGFSIZ(QueueID,JobNumber) {Get Queue Job File Size} │
└─────────────────────────────────────────────────────────────────────────────┘
■ Returns a long integer depicting the secified job number's file size.
■ "QueueID" is a string containing the hex object ID Number of the queue
to service from. The string need not be padded with leading zeros.
■ "JobNumber" is the job number returned when the job was accepted by
using NSVQJOB above.
┌─────────────────────────────────────────────────────────────────────────────┐
│ str=NDTTIME() {Get File Server Date and Time} │
└─────────────────────────────────────────────────────────────────────────────┘
■ Returns a string containing fixed fields of the file server's current
date, time, and day of week.
┌─────────────────────────────────────────────────────────────────────────────┐
│ void=NSBCMDE(mode) {Set Broadcast Mode} │
└─────────────────────────────────────────────────────────────────────────────┘
■ Sets the message mode of the requesting workstation.
The following message modes are defined:
00h Attached servers store both user and server messages intended
for the workstation. The shell automatically retrieves and
displays each message.
01h The server stores server messages but discards user messages
intended for this station. The shell automatically retrieves
and displays each console message.
02h The server stores server messages but discards user messages
intended for this station. The shell ignores the file server's
notification that a message exists in the message buffer.
Applications can poll for and retrieve the most recently stored
message by calling Get Broadcast Message.
03h The server stores both user and server messages intended for
this station. The shell ignores the file server's notification
that a message exists in the message buffer. Applications can
poll for and retrieve the most recently stored message by calling
Get Broadcast Message.
┌─────────────────────────────────────────────────────────────────────────────┐
│ str=NGBCMSG() {Get Broadcast Message} │
└─────────────────────────────────────────────────────────────────────────────┘
■ Returns current broadcast message from queue or a null string if non
present.
┌─────────────────────────────────────────────────────────────────────────────┐
│ log=NATTDIR(Object,Type,Rights,Directory) {Add Trustee to Directory} │
└─────────────────────────────────────────────────────────────────────────────┘
■ Adds a trustee to a directory's trustee list.
■ "Object" is the name of the user or group.
■ "Type" is 1 if object is a user, 2 if object is a group, etc...
■ "Rights" is a character string combining the rights to grant:
"A" - Access Control
"C" - Create
"E" - Erase
"F" - File Scan
"M" - Modify
"R" - Read
"W" - Write
■ "Directory" is the path to grant the rights for.